
<template>
  <div>
    <el-pagination
      show-quick-jumper
      :current-page="queryParam.pageNum"
      :total="total"
      :page-size="queryParam.pageSize"
      v-bind="$attrs"
      :show-total="(total) => `共 ${total} 条`"
      :page-sizes="sizes"
      style="margin:20px 20px 0 0;"
      align="right"
      layout="total, sizes, prev, pager, next, jumper"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
    />
  </div>
</template>

<script>
export default {
  name: 'WangPage',
  components: {},
  props: {
    queryParam: {
      type: Object,
      default() {
        return {}
      }
    },
    total: {
      type: Number,
      default: 0
    },
    sizes: {
      type: Array,
      default: () => [5, 10, 15, 20]
    }
  },
  data() {
    return {}
  },
  created() {},
  mounted() {},
  methods: {
    handleSizeChange(val) {
      this.$emit('onShowSizeChange', val, this.queryParam.pageNum)
    },
    handleCurrentChange(val) {
      this.$emit('changeSize', val, this.queryParam.pageSize)
    }
  }
}
</script>
<style lang='scss' scoped>
</style>
